// Copyright 2023 Hollson. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.

package utils

import (
	"os"
	"strings"
)

// PrefixAny content是否是任意的某个prefix开头
func PrefixAny(content string, prefix ...string) bool {
	content = strings.TrimPrefix(content, " ")
	for _, s := range prefix {
		if strings.HasPrefix(content, s) {
			return true
		}
	}
	return false
}

func Version() string {
	v, _ := os.ReadFile("./version")
	return strings.TrimSpace(string(v))
}
